<div class="breadcrumbs" id="breadcrumbs">
	<ul class="breadcrumb">
		<li><i class="icon-home home-icon"></i><a href="#">Home</a></li>
		<li><a href="<?php Rights::getBaseUrl(); ?>">Access Role</a></li>
		<li><a  href="<?php echo Yii::app()->createUrl('rights/authItem/permissions'); ?>">Permissions</a></li>
		<li class="active">Generate items</li>
	</ul>
	<script type="text/javascript">
		try{ace.settings.check('breadcrumbs' , 'fixed')}catch(e){}
	</script>
</div>
<div class="col-xs-12">
	<div class="page-content">
		<div class="page-header">
			<div class="clearfix">
				<div class="pull-left">
					<h1>
						<h1><?php echo Rights::t('core', 'Generate items'); ?></h1>
					</h1>
				</div>
				<div class="pull-right">
					<div class="btn-toolbar inline middle no-margin">
						<div class="btn-group">
							<a title="Assignments" href="<?php echo Yii::app()->createUrl('rights/assignment/view'); ?>" class="btn btn-sm "><i class="icon-file"></i>&nbsp;&nbsp;Assignments</a>
							<a title="Permissions" href="<?php echo Yii::app()->createUrl('rights/authItem/permissions'); ?>" class="btn btn-sm "><i class="icon-file"></i>&nbsp;&nbsp;Permissions</a>
							<a title="Roles" href="<?php echo Yii::app()->createUrl('rights/authItem/roles'); ?>" class="btn btn-sm "><i class="icon-file"></i>&nbsp;&nbsp;Roles</a>
							<a title="Tasks" href="<?php echo Yii::app()->createUrl('rights/authItem/tasks'); ?>" class="btn btn-sm "><i class="icon-file"></i>&nbsp;&nbsp;Tasks</a>
							<a title="Operations" href="<?php echo Yii::app()->createUrl('rights/authItem/operations'); ?>" class="btn btn-sm "><i class="icon-file"></i>&nbsp;&nbsp;Operations</a>
						</div>
					</div>
				</div>
			</div>
		</div>
		
		<div class="col-xs-12">
			<div class="widget-box">
				<div class="widget-header header-color-blue">
					<h5 class="bigger lighter">
						Generator (<?php echo Rights::t('core', 'Please select which items you wish to generate'); ?>).
					</h5>
				</div>

				<div class="widget-body">
					<div class="widget-main ">
						<div class="form">
							<?php $form=$this->beginWidget('CActiveForm'); ?>
								<div class="">

									<?php echo CHtml::link(Rights::t('core', 'Select all'), '#', array(
										'onclick'=>"jQuery('.generate-item-table').find(':checkbox').attr('checked', 'checked'); return false;",
										'class'=>'selectAllLink')); ?>
									/
									<?php echo CHtml::link(Rights::t('core', 'Select none'), '#', array(
										'onclick'=>"jQuery('.generate-item-table').find(':checkbox').removeAttr('checked'); return false;",
										'class'=>'selectNoneLink')); ?>

								</div>
								<div class="row">
									
									<table class="items generate-item-table" style="margin-left:15px" border="0" cellpadding="10" cellspacing="10">

										<tbody>

											<tr class="application-heading-row">
												<th colspan="3"><?php echo Rights::t('core', 'Application'); ?></th>
											</tr>
											<div class="form-group">
											<?php $this->renderPartial('_generateItems', array(
												'model'=>$model,
												'form'=>$form,
												'items'=>$items,
												'existingItems'=>$existingItems,
												'displayModuleHeadingRow'=>true,
												'basePathLength'=>strlen(Yii::app()->basePath),
											)); ?>
											</div>
										</tbody>

									</table>

								</div>

								<div class="">

									<?php echo CHtml::link(Rights::t('core', 'Select all'), '#', array(
										'onclick'=>"jQuery('.generate-item-table').find(':checkbox').attr('checked', 'checked'); return false;",
										'class'=>'selectAllLink')); ?>
									/
									<?php echo CHtml::link(Rights::t('core', 'Select none'), '#', array(
										'onclick'=>"jQuery('.generate-item-table').find(':checkbox').removeAttr('checked'); return false;",
										'class'=>'selectNoneLink')); ?>

								</div>

								<div class="">

									<?php echo CHtml::submitButton(Rights::t('core', 'Generate')); ?>

								</div>

							<?php $this->endWidget(); ?>

						</div>
					</div>
				</div>
			</div>
		</div><!-- /span -->
		
	</div>
</div>

<div id="generator">
	

</div>